<template>
  <div class="view-content">
    <p class="title">
      数据总览
      <!-- <img style="height: 0.7em;margin-left: 0.3em;" src="../../../../assets/bigDataSourceImage/barTitleIcon.png"> -->
      <img class="title-icon iconOne" src="../../../../assets/bigDataSourceImage/titleIcon1.png"><img class="title-icon iconTwo" src="../../../../assets/bigDataSourceImage/titleIcon2.png"><img class="title-icon iconThree" src="../../../../assets/bigDataSourceImage/titleIcon3.png">
    </p>
    <div class="over-view">
      <div class="parking-num">
        <p>
          <img class="over-view-icon" src="../../../../assets/bigDataSourceImage/parking.png">
          <span class="over-view-title">停车场总数（个）： 107</span>
        </p>
        <div style="margin-top: 1em;font-size: 10px;height: 82%;">
          <Bar :barDatas="parkingNum"/>
        </div>
      </div>

      <div class="parking-lot">
        <p>
          <img class="over-view-icon" src="../../../../assets/bigDataSourceImage/parkingLot.png">
          <span class="over-view-title">停车位总个数（个）： 10786</span>
        </p>
        <div style="margin-top: 1em;font-size: 10px;height: 82%;">
          <Bar :barDatas="parkingLot"/>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import Bar from '@/components/Bar/index.vue'
  export default {
    name: 'over-view',
    components: { Bar },
    data() {
      return {
        enlargeShow: 0,
        parkingNum: [
          {
            name: '高新区',
            value: 52
          },
          {
            name: '新华区',
            value: 23
          },
          {
            name: '长安区',
            value: 32
          },
        ],
        parkingLot: [
          {
            name: '高新区',
            value: 5286
          },
          {
            name: '新华区',
            value: 2500
          },
          {
            name: '长安区',
            value: 3000
          },
        ]
      }
    },
    mounted() {
      // this.getEnlarge();
    },
    methods: {
      // getEnlarge() {
      //   let num = 0;
      //   setInterval(function() {
      //     num += 1;
      //     this.enlargeShow = num%3;
      //     console.log(this.enlargeShow)
      //   },200)
      // }
    }
  }
</script>

<style scoped>
  p {
    margin: 0;
  }
  .view-content {
    height: 100%;
  }
  .title {
    margin: 0;
    color: #fff;
    font-size: 1em;
  }
  .over-view {
    border: 1px solid transparent;
    border-image-source: url('../../../../assets/bigDataSourceImage/box1.png');
    border-image-slice: 26 26 26 26;
    border-image-repeat: stretch;
    border-image-width: 26px;
    box-sizing: border-box;
    height: 86%;
    margin-top: 0.6em;
    /* padding: 1.7em 2.6em 1.8em 2.6em; */
	padding: 1.6em 1.8em;
    display: flex;
    justify-content: space-between;
  }
  .parking-num,
  .parking-lot {
    width: 47.6%;
    height: 100%;
    background-color: rgba(1, 68, 101, 0.5);
    padding: 1em 1.2em;
    padding-right: 0;
  }
  .over-view-icon {
    height: 1.6em;
    vertical-align: middle;
  }
  .over-view-title {
    color: #fff;
    font-size: 0.6em;
    margin-left: 0.6em
  }
  /* .bar-box {
    margin-top: 1.2rem;
  } */
  /* .bar {
    height: 1.1rem;
    width: 23.4rem;
    background-color: #000000;
    margin: 1.2rem 0;
    display: inline-block;
  } */
  /* .bar-title {
    color: #fff;
    font-size: 1.4rem;
  } */
  /* .bar-title-spot {
    display: inline-block;
    height: 0.4rem;
    width: 0.4rem;
    border-radius: 50%;
    background-color: #fff;
    vertical-align: middle;
  } */
  /* .bar-num {
    padding: 4px 0;
    color: #fff;
    vertical-align: top;
    display: inline-block;
  } */
  /* .bar-one {
    background-image: linear-gradient(to right, RGBA(0, 154, 221, 1), RGBA(0, 43, 165, 1));
    width: 70%;
    height: 100%;
  } */
  .title-icon {
    height: 0.7em;
    margin-right: -3px;
  }
  .iconOne,
  .iconTwo,
  .iconThree {
    animation: enlarge 0.9s infinite;
  }
  .iconTwo {
    animation-delay: 0.3s;
  }
  .iconThree {
    animation-delay: 0.6s;
  }

  @keyframes enlarge {
    0% {transform: scale(1);}
    33.33% {transform: scale(1.3);}
    66.66% {transform: scale(1);}
    100% {transform: scale(1);}
  }

</style>
